package com.ali.juejin.ui.activity

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.ViewModelProvider
import com.ali.juejin.R
import com.ali.juejin.databinding.ActivityLoginBinding
import com.ali.juejin.model.login.LoginModel
import kotlinx.android.synthetic.main.activity_login.*

class LoginActivity : AppCompatActivity() {

    val model by lazy { ViewModelProvider(this).get(LoginModel::class.java) }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val binding = DataBindingUtil.setContentView<ActivityLoginBinding>(this,R.layout.activity_login)
        binding.model = model
        login_back.setOnClickListener {
            finish()
        }
    }

}